/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Microsoft
 * Date: 2023-01-10
 * Time: 16:08
 */
public class Test {
    public static void fun(int[] arr) throws CloneNotSupportedException,NullPointerException {
        if(arr == null){
            throw new CloneNotSupportedException();
        }
    }
    public static void main(String[] args) throws CloneNotSupportedException {
        try{
            //存放可能抛出异常的代码
            fun(null);
            System.out.println("这里不会被执行");
        }catch (CloneNotSupportedException a){
            a.printStackTrace();
            System.out.println(123);
        }catch (NullPointerException a){
            System.out.println(456);
        }
    }
}


